package com.ifox.hgx.spring.aop;

import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Copyright (C), 2017-2018, 成都艾弗克斯科技有限公司
 * Author:   hanguixian
 * Date:     2018/10/21 15:00
 * Description:
 */
public class Main {

    private static ClassPathXmlApplicationContext context;

    static {
        context = new ClassPathXmlApplicationContext("application-aop.xml");
    }

    @Test
    public void  test1(){

        ArithmeticCalculator arithmeticCalculator = context.getBean(ArithmeticCalculator.class) ;

        System.out.println(arithmeticCalculator.add(1,2));

            System.out.println(arithmeticCalculator.div(3,2));
    }

}
